<%--
  Created by IntelliJ IDEA.
  User: leixiaolong
  Date: 2018/9/11
  Time: 下午7:06
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<link rel="stylesheet" href="${pageContext.request.contextPath}/plugins/layui/css/layui.css" media="all" type="text/css">
<script language='javascript' src="${pageContext.request.contextPath}/plugins/layui/layui.js"></script>
<style>
    <%--登陆界面选择框css--%>
    .layui-form-select{
        width: 200px !important;
        margin-left: 10px;
    }
</style>
<html>
<head>
    <title>进销存管理</title>
</head>
<body style="background:url(/image/back/chain_01.jpeg); background-size: cover">
<div style="width:600px; height:350px; margin-top: 10%; margin-left: 26%; border: 2px solid; border-radius: 15px;">
    <form class="layui-form" action="/doLogin" method="post" style="padding:20px 35px 20px 35px">
        <header style="text-align: center; padding: 10px;">
            <h1>进销存管理</h1>
        </header>
        <div class="layui-box">
            <div class="layui-form-item" style="margin-top:20px; display:-webkit-box">
                <label class="layui-form-label" style="font-size:26px; width: 150px; text-align: right"><i class="layui-icon" style="font-size: 26px;">&#xe677;</i></label>
                <select class="layui-from-select"
                        style="margin-left: 10px !important; font-size: 24px; ">
                    <option value="">请选择</option>
                    <option value="1">拼多多</option>
                </select>
            </div>
            <div class="layui-form-item" style="margin-top:20px;">
                <label class="layui-form-label" style="font-size:26px; width: 150px; text-align: right"><i class="layui-icon" style="font-size: 26px;">&#xe66f;</i></label>
                <input type="text" name="username" class="layui-input layui-input-inline" style="width: 200px; font-size: 16px; margin-left:10px;"
                       lay-verify="required" autocomplete="off" placeholder="请输入用户名">
            </div>
            <div class="layui-form-item" style="margin-top:20px;">
                <label class="layui-form-label" style="font-size:26px; width: 150px; text-align: right"><i class="layui-icon" style="font-size: 26px;">&#xe673;</i></label>
                <input type="password" name="password" class="layui-input layui-input-inline" style="width: 200px; font-size: 16px; margin-left:10px;"
                       lay-verify="required" autocomplete="off" placeholder="请输入密码">
            </div>
            <div class="layui-form-item" style="margin-top: 10px;">
                <div class="btn-login-right" style="float: right; margin-right: 130px;">
                    <button class="layui-btn " lay-submit lay-filter="login">
                        <i class="layui-icon layui-icon-face-smile" aria-hidden="true"></i> 登陆
                    </button>
                </div>
                <div style="clear:both"></div>
            </div>
        </div>
    </form>
</div>
</body>
</html>

<script>
    layui.use(["layer", "form", "element", "jquery"], function(){
        var layer = layui.layer, form = layui.form, $ = layui.jquery;

        form.on('submit(login)', function(data){
            debugger
            console.log(JSON.stringify(data.field));
            var params = {
                'username': data.field.username,
                'password': data.field.password
            };
        });
    });
</script>
